import React from "react";
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import NotFoundPage from './components/NotFoundPage';
import Login from './components/Login';
import Register from './components/Register';
import Home from './components/Home';
import User from './components/User';
import Reviewer from './components/Reviewer';
import Admin from './components/Admin';
import Admin_createAccount from './components/Admin_createAccount';

//积分模块
import Admin_PublishActivity from './components/Admin_PublishActivity';
import Admin_ActivityList from './components/Admin_ActivityList';
// import Admin_ResearchPoint from './components/Admin_ResearchPoint';
// import Admin_UserInfoList from './components/Admin_UserInfoList';
import Admin_integral from './components/Admin_integral';
import Admin_AddExchangeRule from './components/Admin_AddExchangeRule';
import Admin_ExchangeRecordList from './components/Admin_ExchangeRecordList';
import Admin_RuleList from './components/Admin_RuleList';
//学分模块
import Admin_credits from './components/Admin_credits';
// import Admin_addStudents from './components/Admin_addStudents';
import Admin_GetTotalCredit from './components/Admin_GetTotalCredit';
import GetTotalScore from './components/GetTotalScore';
import Admin_GetUserCourseInfo from './components/Admin_GetUserCourseInfo';
import Admin_addMultiCourses from './components/Admin_addMultiCourse';
import Admin_CourseManage from './components/Admin_CourseManage';
import Admin_getStudentInfoList from './components/Admin_getStudentInfoList';
// 测试

import User_GetOwnInfo from './components/User_GetOwnInfo';
import User_MaterialList from './components/User_MaterialList';
// import User_ReacherPoint from './components/User_ReacherPoint';
import User_uploadMaterial from './components/User_uploadMaterial';
import User_JoinActivity from './components/User_JoinActivity';
// import User_updateOwnerInfo from './components/User_updateOwnerInfo';
// import Student_Info from "./components/Student_Info";
// import User_registerStudent from "./components/User_registerStudent";

import Reviewer_Material from './components/Reviewer_Material';
import Reviewer_MaterialList from './components/Reviewer_MaterialList';
import Reviewer_doCourseRecord from "./components/Reviewer_doCourseRecord";
import User_userExchangeGift from "./components/User_userExchangeGift";
import Admin_initMultiCourseRecord from "./components/Admin_initMultiCourseRecord";





const AppRouter = () => (
    <Router>
        <Routes>
            {/* 首页 登录 注册 */}
            <Route path="/" element={<Home />} />
            <Route path="/login" element={<Login />} />
            <Route path="/register" element={<Register />} />
            {/* 用户 首页 上传材料 参加活动 查询积分 查看参加活动列表 获取个人信息 修改个人信息 */}
            <Route path="/user/:address" element={<User />} />
            <Route path="/user/:address/User_uploadMaterial" element={<User_uploadMaterial />} />
            <Route path="/user/:address/User_JoinActivity" element={<User_JoinActivity />} />
            {/* <Route path="/user/:address/User_ReacherPoint" element={<User_ReacherPoint />} /> */}
            <Route path="/user/:address/User_MaterialList" element={<User_MaterialList />} />
            <Route path="/user/:address/User_GetOwnInfo" element={<User_GetOwnInfo />} />
            {/* <Route path="/user/:address/User_updateOwnerInfo" element={<User_updateOwnerInfo />} /> */}
            <Route path="/user/:address/User_userExchangeGift" element={<User_userExchangeGift />} />

            {/* 审核员 审核材料更新积分 审核材料列表  */}
            <Route path="/reviewer/:address" element={<Reviewer />} />
            <Route path="/reviewer/:address/Reviewer_Material" element={<Reviewer_Material />} />
            <Route path="/reviewer/:address/Reviewer_MaterialList" element={<Reviewer_MaterialList />} />

            {/* 审核员（学分部分） 录入成绩*/}
            <Route path="/reviewer/:address/Reviewer_doCourseRecord" element={<Reviewer_doCourseRecord />} />



            {/* 管理员 首页 创建账户 用户管理*/}
            <Route path="/admin/:address" element={<Admin />} />
            <Route path="/admin/:address/Admin_createAccount" element={<Admin_createAccount />} />
            <Route path="/admin/:address/Admin_getStudentInfoList" element={<Admin_getStudentInfoList />} />
            {/* 管理员（积分部分） 发布活动 管理活动 积分管理 用户信息管理 */}
            {/* <Route path="/admin/:address/Admin_integral" element={<Admin_integral />} /> */}
            <Route path="/admin/:address/Admin_integral/Admin_publishActivity" element={<Admin_PublishActivity />} />
            <Route path="/admin/:address/Admin_integral/Admin_ActivityList" element={<Admin_ActivityList />} />
            {/* <Route path="/admin/:address/Admin_integral/Admin_ResearchPoint" element={<Admin_ResearchPoint />} /> */}
            {/* <Route path="/admin/:address/Admin_integral/Admin_UserInfoList" element={<Admin_UserInfoList />} /> */}

            {/* 管理员（学分部分） 课程管理、批量添加课程、批量添加学生、 计算学分 计算总成绩 查询用户课程信息 学生信息列表*/}
            {/* <Route path="/admin/:address/Admin_credits" element={<Admin_credits />} /> */}
            <Route path="/admin/:address/Admin_credits/Admin_CourseManage" element={<Admin_CourseManage />} />
            <Route path="/admin/:address/Admin_credits/Admin_addMultiCourses" element={<Admin_addMultiCourses />} />
            {/* <Route path="/admin/:address/Admin_credits/Admin_addStudents" element={<Admin_addStudents />} /> */}
            {/* <Route path="/admin/:address/Admin_credits/Admin_GetTotalCredit" element={<Admin_GetTotalCredit />} /> */}
            <Route path="/admin/:address/Admin_credits/GetTotalScore" element={<GetTotalScore />} />
            <Route path="/admin/:address/Admin_credits/Admin_GetUserCourseInfo" element={<Admin_GetUserCourseInfo />} />
            {/* 管理员（奖品部分） 添加积分兑换规则、积分列表及删改、查看用户兑换记录 */}
            <Route path="/admin/:address/Admin_credits/Admin_AddExchangeRule" element={<Admin_AddExchangeRule />} />
            <Route path="/admin/:address/Admin_credits/Admin_RuleList" element={<Admin_RuleList />} />
            <Route path="/admin/:address/Admin_credits/Admin_ExchangeRecordList" element={<Admin_ExchangeRecordList />} />

            {/* 测试 */}
            <Route path="/admin/:address/Admin_credits/Admin_initMultiCourseRecord" element={<Admin_initMultiCourseRecord />} />



            {/* 未定义路由 */}
            {/* <Route path="*" element={<NotFoundPage />} /> */}







        </Routes>
    </Router>
)

export default AppRouter;